package com.oa.overtime.dao;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.oa.overtime.entity.Overtime;

@Repository
public interface IOvertimeDao extends PagingAndSortingRepository<Overtime, Long>, JpaSpecificationExecutor<Overtime> {
	@Query("from Overtime o where o.name = ?1 order by id desc")
	public Page<Overtime> findOvertimeForm(String name, Pageable pageable);

}
